<template>
	<view class="number-row" :style="borderStyle">
		<view class="row-name">{{name}}</view>
		<view class="row-value">{{value}}</view>
	</view>
</template>

<script>
	/**
	 * author: 陈炎
	 * description: 用于显示文本框
	 * name表示文本框名称
	 * value表示文本框内容
	 * isLast表示是否为最后一项，用于防止相邻文本框上下边框重叠过粗
	 * 		isLast为true时，文本框将显示下边框
	 * 		isLast为false时，文本框不显示下边框
	 */
	export default{
		props: {
			name: {
				type: String,
				default: ''
			},
			value:{
				type:String,
				default:''
			},
			isLast: {
				type: Boolean,
				default:false
			}
		},
		data() {
			return {
				borderStyle: this.isLast?'border-bottom: solid 1rpx #C0C0C0;':'',
			}
		},
	}
</script>

<style>
	.number-row{
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: #FFFFFF;
		border: solid 1rpx #C0C0C0;
		border-bottom: 0;
	}
	.row-name{
		display: flex;
		flex-direction: column;
		margin-left: 50rpx;
		justify-content: center;
		height: 100rpx;
		width: 200rpx;
	}
	.row-value{
		width: 400rpx;
		height: 100rpx;
		display: flex;
		align-items: center
	}
</style>
